#!/bin/bash
pushd .. >/dev/null
export BASE="$PWD"
[ -f './meta/server.pid' ] && cat ./meta/server.pid && exit
popd >/dev/null

while [ ! -f ../meta/server.pid ]; do
  BASE="$BASE" su -c './dist/sbin/lighttpd -m ./dist/lib -f ../config/l.conf -D'
  echo 'Web server restarted'
  sleep 2
done
